/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 */

import { Tester, TestSuite, TestCase } from '@rnoh/testerino';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import React from 'react';
import {
  View,
  StyleSheet
} from 'react-native';
import RootNavigation from './navigation/RootNavigationView';
import { NavigationContainer } from '@react-navigation/native';
import { enableFreeze, enableScreens } from 'react-native-screens';

enableScreens(false)
enableFreeze(true)

function App(): JSX.Element {

  return (
    <GestureHandlerRootView style={{ flex: 1 }}>
      <NavigationContainer>
        <View style={{ flex: 1, backgroundColor: '#FFEEDD' }}>
          <RootNavigation />
        </View>
      </NavigationContainer>
    </GestureHandlerRootView>

  );
}

const styles = StyleSheet.create({
  container: {
    height: 500,
    overflow: 'hidden'
  },
});

export const displayName = 'react-native-screens';
export const framework = 'React';
export const category = 'basic';
export const title = 'react-native-screens';
export const documentationURL = 'https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-screens.md';
export const description = 'react-native-screens';

export const examples = [
  {
    title: 'react-native-screens',
    render: function (): any {      
      return (
        <View>
        <Tester style={{ paddingBottom: 80 }}>
          <TestSuite name={'Screens'}>            
            <TestCase itShould={'结合lottie使用'}>
              <View style={styles.container}>
                <App />
              </View>
            </TestCase>
          </TestSuite>
        </Tester>
      </View>
      );
    },
  },
];
